//Прерывание потока управления. Оператор break. 
import javax.swing.*;

public class My7
{
    public static void main(String[] args)
    {
    System.out.println("It is program My7");

    for (int i2=1;i2<10;i2++)
    {
    String input=JOptionPane.showInputDialog("Variant (1,2,3,4,5):");
    int i1=Integer.parseInt(input);
    if (i1==55) break;
    if (i1==66) continue;
    switch (i1)
        {
        case 1:System.out.println("Variant 1");break;
        case 2:System.out.println("Variant 2");break;
        case 3:System.out.println("Variant 3");break;
        case 4:System.out.println("Variant 4");break;
        case 5:System.out.println("Variant 5");break;
        default:System.out.println("NO Variant");
        }
    System.out.println("Cycle: "+i2);
    }
    System.exit(0);
    }

}
